package day07HomeWork;/*
Student、Teacher、Doctor类和Test类
Person类：name、age、address、Person(参)、eat()、sleep()，sayHi()
Student类：继承Person、className、stuId，Student(参)、study()，重写sayHi()方法
Teacher类：继承Person、salary，Teacher(参)、teach()，重写sayHi()方法
Doctor类：继承Person、title，Doctor(参)、cut()
Test：创建对象、调用方法测试*/

public class Chick extends Animal {
    String layegg;

    Chick() {

    }

    Chick(String name, int age, String color, String layegg) {
        super(name, age, color);
        this.layegg = layegg;
    }

    void layegg() {
        System.out.println(color + "色的," + age + "岁的小鸡," + name + "正在下蛋...");
    }

    void eat() {
        System.out.println(color + "色的," + age + "岁的小鸡," + name + "正在吃小米...");
    }
}
